-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add MsgLeaveGroup
to group module
#10887
Conversation
The challenge we're going to run into here is how do we adjust the threshold in ThresholdDecisionPolicy. Seems like that's not resolved from #9657. Ideas @aleem1314 @blushi @AmauryM ? Maybe we choose to switch to a PercentageDecisionPolicy or there's a method on DecisionPolicy to handle &/or reject members leaving |
This issue could actually already happen when a group admin removes group members (through |
@aaronc Actually I've just realized that currently, you cannot create a proposal if the policy threshold is greater than the total group weight, see cosmos-sdk/x/group/keeper/msg_server.go Line 416 in aaa61e3
Lines 115 to 117 in aaa61e3
So in this case, current proposals get invalidated (because group is updated) and new proposals can't be created. But I agree this is not ideal from a user standpoint, this should error earlier on members updates rather than on proposal creation, thoughts? |
Codecov Report
@@ Coverage Diff @@
## master #10887 +/- ##
==========================================
- Coverage 66.02% 66.00% -0.03%
==========================================
Files 704 665 -39
Lines 71853 69032 -2821
==========================================
- Hits 47442 45562 -1880
+ Misses 21472 20799 -673
+ Partials 2939 2671 -268
|
This pull request introduces 1 alert when merging d877e54 into eb01537 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 90306c1 into 6ea2049 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging cce7b03 into 6ea2049 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 8f9bfb6 into 96bc6a5 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-approving
Co-authored-by: Marie Gauthier <[email protected]>
## Description It seems like #10887 broke group simulations, fixing them here. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
Description
Closes: #9657
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change